package com.hina.rec.endpoint.res.base;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 基础响应类
 *
 * @author liaosp
 * @date 2023-11-15
 */
@Data
@Schema(description = "基础响应类")
public class BaseRes {

    /**
     * ID
     */
    @Schema(description = "ID", example = "1")
    private Integer id;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "创建时间", example = "2023-11-15 12:00:00")
    private LocalDateTime createdAt;

    /**
     * 创建人
     */
    @Schema(description = "创建人", example = "system")
    private String createdBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "更新时间", example = "2023-11-15 12:00:00")
    private LocalDateTime updatedAt;

    /**
     * 更新人
     */
    @Schema(description = "更新人", example = "system")
    private String updatedBy;
}